package com.mrjy.maintain.util;

import java.util.Comparator;

import com.mrjy.maintain.dto.PromoteDetailDTO;

public class PromoteDetailDTOComparator implements Comparator<PromoteDetailDTO> {

	/**	
	 * 返回 1 代表前者大于后者，交换两者的位置，即大者在后面，即为升序
	 * 返回-1 代表前者小于后者
	 * 返回0 代表两者相等
	 */
	@Override
	public int compare(PromoteDetailDTO dto1, PromoteDetailDTO dto2) {
		int result = 0 ;
		result = dto2.getCompleteTimeString().compareTo(dto1.getCompleteTimeString());
		return result;
	}
}
